/* GUI CONVERTED from rcscmtb.p (converter v1.75) Sat Aug 12 23:01:24 2000 */
/* rcscmtb.p - Release Management Customer Schedules                          */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/*V8:ConvertMode=Maintenance                                                  */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                       */
/* REVISION: 8.6    LAST MODIFIED: 09/20/96           BY: TSI *K005*          */
/* REVISION: 8.6E   LAST MODIFIED: 04/10/98           BY: *K1ND* A.Licha      */
/* REVISION: 8.6E   LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan   */
/* REVISION: 8.6E   LAST MODIFIED: 10/04/98           BY: *J314* Alfred Tan   */
/* REVISION: 8.6E   LAST MODIFIED: 08/19/99           BY: *K229* Surekha Joshi*/
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb                  */

         /* SCHEDULE DETAIL MAINT SUBPROGRAM */

         {mfdeclre.i}
{gplabel.i} /* EXTERNAL LABEL INCLUDE */

         /* INPUT PARAMETERS */
         define input parameter sch_recid as recid no-undo.

         /* LOCAL VARIABLES */
         define variable i as integer no-undo.
         define variable schddet_recid as recid no-undo.
         define variable cmmts as logical no-undo.
         define variable rqmts as logical no-undo.
         define variable prior_cum_qty as decimal no-undo.

         {rcscfrm.i "new"}

         find sch_mstr
            where recid(sch_mstr) = sch_recid
            no-lock.

         for each schd_det
            where schd_type     = sch_type
              and schd_nbr      = sch_nbr
              and schd_line     = sch_line
              and schd_rlse_id  = sch_rlse_id
            exclusive-lock:

            schd_upd_qty = if sch_cumulative
                              then schd_cum_qty else schd_discr_qty.
         end.

         mainloop:
         do transaction with frame sched_det:
/*GUI*/ if global-beam-me-up then undo, leave.

            clear frame sched_det all no-pause.
            view frame sched_det.

/*K229*/    /* DO NOT DISPLAY/PRINT COMPLETELY SHIPPED SCHD_DET RECORDS */
            find first schd_det
               where schd_type                         = sch_type
                 and schd_nbr                          = sch_nbr
                 and schd_line                         = sch_line
                 and schd_rlse_id                      = sch_rlse_id
/*K229*/         and trim(substring(schd_fc_qual,2,1)) = ""
               no-lock no-error.

            schddet_recid = if available schd_det
                               then recid(schd_det) else ?.

            /* REPAINT DOWN FRAME */
/*K1ND*/    /* ADDED INPUT PARAMETER NO FOR NEW_SCHD_DET */
            {gprun.i ""rcscmtb3.p"" "(input schddet_recid,
                                      input no)" }
/*GUI*/ if global-beam-me-up then undo, leave.


            /* MAINTAIN SCHEDULE DETAIL LINES */
            {gprun.i ""rcscmtb1.p"" "(input recid(sch_mstr))"}
/*GUI*/ if global-beam-me-up then undo, leave.


         end.
/*GUI*/ if global-beam-me-up then undo, leave.
 /* mainloop */

         ststatus = stline[2].
         status input ststatus.
         hide frame sched_det no-pause.
